package routeFunctions;

import com.google.android.maps.GeoPoint;

/**
 * A class to store Longitude and Latitude coordinates and
 * easily convert them to a GeoPoint.
 */
public class Loc {
    private double lat;
    private double lon;

    /**
     * Constructor for this Loc.
     * @param lat The latitude coordinate value for this Loc.
     * @param lon The longitude coordinate value for this Loc.
     */
    public Loc(double lat, double lon) {
        this.lat = lat;
        this.lon = lon;
    }

    public double getLat() {
    	return lat;
    }
    
    public double getLon() {
    	return lon;
    }
    
    /**
     * Converts this Loc to a GeoPoint.
     * @return A GeoPoint converted from this Loc.
     */
    public GeoPoint toGeoPoint() {
        return new GeoPoint((int) (this.lat * 1e6), (int) (this.lon * 1e6));
    }
}
